<template>
	<view>
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '',
				title: '',
			}
		},
		onLoad(val) {
			this.url = decodeURIComponent(val.url)
			this.title = decodeURIComponent(val.title)
			// 设置当前的title 如果外链中有的话将被覆盖
			if(this.title != null && this.title != ''){
					this.setTitle(this.title)
			}
		},
		methods: {
			setTitle(title) {
				uni.setNavigationBarTitle({
						title: title
				})
			},
		}
	}
</script>

<style>

</style>
